package com.zhangjie.easyexcel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.metadata.CellData;
import java.util.Map;

public class ExcelListener extends AnalysisEventListener<UserData> {
    @Override//一行一行读取excel内容，从第二行读取
    public void invoke(UserData userData, AnalysisContext analysisContext) {
        System.out.println(userData);
    }

    @Override//读取之后执行
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
    }
    @Override//读取的表头信息
    public void invokeHead(Map<Integer, CellData> headMap, AnalysisContext context) {
        System.out.println("表头信息"+headMap);
    }
}
